﻿<wpfui:UiWindow
    x:Class="LenovoLegionToolkit.WPF.Windows.Utils.LanguageSelectorWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:utils="clr-namespace:LenovoLegionToolkit.WPF.Utils"
    xmlns:wpfui="http://schemas.lepo.co/wpfui/2022/xaml"
    Title="Lenovo Legion Toolkit"
    MinWidth="450"
    MinHeight="220"
    MaxWidth="450"
    MaxHeight="220"
    Closed="LanguageSelectorWindow_OnClosed"
    ExtendsContentIntoTitleBar="True"
    FlowDirection="{x:Static utils:LocalizationHelper.Direction}"
    ResizeMode="NoResize"
    Topmost="True"
    WindowStartupLocation="CenterScreen">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <wpfui:TitleBar
            Title="Lenovo Legion Toolkit"
            Grid.Row="0"
            CanMaximize="false"
            ShowMaximize="false"
            ShowMinimize="false"
            UseSnapLayout="false" />

        <Grid Grid.Row="1" Margin="16">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <StackPanel
                Grid.Row="0"
                Grid.Column="0"
                Margin="0,0,16,0">
                <wpfui:SymbolIcon FontSize="56" Symbol="LocalLanguage24" />
            </StackPanel>

            <StackPanel Grid.Row="0" Grid.Column="1">

                <TextBlock
                    Margin="0,0,0,16"
                    FontWeight="Medium"
                    Text="Select language"
                    TextWrapping="Wrap" />

                <ComboBox x:Name="_languageComboBox" MaxDropDownHeight="Auto" />

            </StackPanel>

            <Grid
                Grid.Row="1"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="0,16,0,0"
                HorizontalAlignment="Center">

                <wpfui:Button
                    Grid.Column="0"
                    MinWidth="120"
                    Appearance="Primary"
                    Click="OK_Click"
                    Content="OK" />
            </Grid>
        </Grid>
    </Grid>

</wpfui:UiWindow>
